package com.zjlanyun.eplus.network;

import com.zjlanyun.eplus.utils.SPData;

public class WebApi {

    public static final String URL_PREFIX = "http://";

    /**
     * 统一接口
     * @return
     */
    public static String api() {
        if (SPData.getUserinfo().getBoolean("isDemo", true)) {
            return URL_PREFIX + SPData.getUserinfo().getString("serverUrlDemo", "") + "/api.aspx";
        } else {
            return URL_PREFIX + SPData.getUserinfo().getString("serverUrl", "") + "/api.aspx";
        }
    }



    /**
     * 绑定设备，检测绑定
     * @return
     */
    public static String deviceBind() {
        return URL_PREFIX + "appupdate.zjlanyun.com:880/app.php?g=api&m=customer&a=bind";
    }

    /**
     * 解绑设备
     * @return
     */
    public static String device_unbind() {
        return URL_PREFIX + "appupdate.zjlanyun.com:880/app.php?g=api&m=customer&a=unbind";
    }

    /**
     * 设备退出
     * @return
     */
    public static String device_logout() {
        return URL_PREFIX + "appupdate.zjlanyun.com:880/app.php?g=api&m=customer&a=logout";
    }

    //新版本检查地址
    public static final String VERSION_URL = URL_PREFIX + "appupdate.zjlanyun.com:880/app.php?m=customer&a=get_last_version";
}
